package com.yb.recursion;

/**
 * @program: algorithm_and_data_structure
 * @description: 递归例子
 * @author: Mr.Bo
 * @create: 2020-07-25 23:06
 **/
public class TestRecursion {

    public static void main(String[] args) {
        print(10);
    }

    // 递归
    public static void print(int i) {
        if (i > 0) {
            System.out.println(i);
            print(i - 1);
        }
    }
}
